﻿using SaleManagement.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SaleManagement.Models
{
    public class WarehouseModel
    {
        public int id{get;set;}


        public string created_at { get; set; }

        public string updated_at { get; set; }

        public int shop_id { get; set; }

        public string name { get; set; }

        public string address { get; set; }


        public string comments { get; set; }

        public WarehouseModel()
        {
        }
        public List<WarehouseModel> select(int shop_id)
        {
            string url = "http://192.168.0.105/sale-server/public/" + shop_id + "/warehouse";
            return Template.getData<List<WarehouseModel>>(url);
        }
        public void insert(WarehouseModel warehouse,int shop_id)
        {
            string url = "http://192.168.0.105/sale-server/public/" + shop_id + "/warehouse/insert";
              Template.Create<WarehouseModel>(warehouse,url);
        }
    }
}
